package com.yeung.exam;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class 字符矩阵 {
    private static final char[][] ch = null;

    public static void main(String[] str) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] arr = s.split(";");
        //列数
        Integer col = Integer.parseInt(arr[0]);
        //将字符串转为数组
        char[] datas = arr[1].toCharArray();
        int al = datas.length;
        //行数
        int hang = (int) Math.ceil(al * 1.0 / col);
        List<char[]> list = new ArrayList<>();
        int start = 0;
        int end;
        while (true) {
            end = (start + col < al) ? start + col : al;
            char[] tmp = Arrays.copyOfRange(datas, start, end);
            list.add(tmp);
            start = start + col;
            if (start > al) break;
        }
        for (char[] chs : list) {
            for (char c : chs) {
                System.out.print(c + "\t");
            }
        }
    }
}